import AccountService from './accountService'
import LineService from './lineService'
import AreaService from './areaService'
import ProductService from './productService'
import mineService from './mineService'
import OtherService from './otherService'
import AlipayService from './alipayService'

// 加载所有service---非node项目，无法使用fs，只能一个一个手动引入了
// const routeList = fs.readdirSync('./service/','utf-8');
// routeList.forEach(item=> {
//     const routeName = item.substring(0,item.lastIndexOf('.'));
//     console.log(routeName)
// })

export default {
  install: function(Vue) {
    // 注册：挂在到全局
    Vue.prototype.AccountService = AccountService
    Vue.prototype.LineService = LineService
    Vue.prototype.AreaService = AreaService
    Vue.prototype.ProductService = ProductService
    Vue.prototype.mineService = mineService
    Vue.prototype.OtherService = OtherService
    Vue.prototype.AlipayService = AlipayService
  }
}
